package com.wanpinghui.wphlibrary.model.addrbook.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 功能描述
 * author:caitiangui
 * time:2018/1/3
 */

public class AddrbookBean implements Parcelable {


    /**
     active (integer, optional),
     addr (string, optional): 详细地址（不含省市区） ,
     area_id (integer, optional),
     avatar (string, optional): 头像 ,
     bal (number, optional): 余额 ,
     bank_acct_name (string, optional): 银行开启名 ,
     bank_acct_num (string, optional): 银行账号 ,
     bank_name (string, optional): 银行名称 ,
     bind_date (string, optional),
     bind_user_id (integer, optional),
     bind_user_name (string, optional),
     bind_wx_openid (integer, optional): 绑定过微信openid，0：否；1：是； ,
     black (boolean, optional),
     breach_count (integer, optional),
     callback_at (integer, optional),
     city (string, optional): 市 ,
     com (string, optional): 公司名称 ,
     created_at (integer, optional),
     credit (integer, optional),
     deleted_at (integer, optional),
     encrypted_ (string, optional): 上传加密串 ,
     gender (integer, optional): 性别，0：女；1：男； ,
     has_paid (boolean, optional),
     has_set_business (boolean, optional),
     id (integer, optional),
     im_token (string, optional),
     industry (integer, optional): 行业，0：其它；1：喷绘；2：LED； ,
     is_internal (boolean, optional),
     is_virt (integer, optional),
     level (integer, optional): 用户等级，0：无；10：铁牌；20：铜牌；30：银牌；40：金牌； ,
     mobile (string, optional): 手机号 ,
     nickname (string, optional): 昵称 ,
     no_sms (integer, optional): 退订短信，0：否；1：是； ,
     phone_area_id (integer, optional),
     pos (string, optional): 公司职位 ,
     prov (string, optional): 省 ,
     push_reg_id (string, optional),
     recent_login_at (integer, optional),
     remark (string, optional),
     sms_current_send_date (string, optional),
     sms_marketing_first_date (string, optional),
     sms_marketing_level (integer, optional),
     sms_marketing_obj (boolean, optional),
     sms_marketing_respond (boolean, optional),
     sms_marketing_respond_datetime (string, optional),
     status (integer, optional),
     type (integer, optional): 用户类型，1：客户；100：工程商；200：客服； ,
     updated_at (integer, optional),
     war_zone_id (integer, optional),
     wx_openid (string, optional)
     */

    private int active;
    private String addr;
    private int area_id;
    private String avatar;
    private double bal;
    private String bank_acct_name;
    private String bank_acct_num;
    private String bank_name;
    private String bind_date;
    private int bind_user_id;
    private String bind_user_name;
    private int bind_wx_openid;
    private boolean black;
    private int breach_count;
    private int callback_at;
    private String city;
    private String com;
    private long created_at;
    private int credit;
    private int deleted_at;
    private String encrypted_;
    private int gender;
    private boolean has_paid;
    private boolean has_set_business;
    private long id;
    private String im_token;
    private int industry;
    private boolean is_internal;
    private int is_virt;
    private int level;
    private String mobile;
    private String nickname;
    private int no_sms;
    private int phone_area_id;
    private String pos;
    private String prov;
    private String push_reg_id;
    private int recent_login_at;
    private String remark;
    private String sms_current_send_date;
    private String sms_marketing_first_date;
    private int sms_marketing_level;
    private boolean sms_marketing_obj;
    private boolean sms_marketing_respond;
    private String sms_marketing_respond_datetime;
    private int status;
    private int type;
    private int updated_at;
    private int war_zone_id;
    private String wx_openid;

    protected AddrbookBean(Parcel in) {
        active = in.readInt();
        addr = in.readString();
        area_id = in.readInt();
        avatar = in.readString();
        bal = in.readDouble();
        bank_acct_name = in.readString();
        bank_acct_num = in.readString();
        bank_name = in.readString();
        bind_date = in.readString();
        bind_user_id = in.readInt();
        bind_user_name = in.readString();
        bind_wx_openid = in.readInt();
        black = in.readByte() != 0;
        breach_count = in.readInt();
        callback_at = in.readInt();
        city = in.readString();
        com = in.readString();
        created_at = in.readLong();
        credit = in.readInt();
        deleted_at = in.readInt();
        encrypted_ = in.readString();
        gender = in.readInt();
        has_paid = in.readByte() != 0;
        has_set_business = in.readByte() != 0;
        id = in.readLong();
        im_token = in.readString();
        industry = in.readInt();
        is_internal = in.readByte() != 0;
        is_virt = in.readInt();
        level = in.readInt();
        mobile = in.readString();
        nickname = in.readString();
        no_sms = in.readInt();
        phone_area_id = in.readInt();
        pos = in.readString();
        prov = in.readString();
        push_reg_id = in.readString();
        recent_login_at = in.readInt();
        remark = in.readString();
        sms_current_send_date = in.readString();
        sms_marketing_first_date = in.readString();
        sms_marketing_level = in.readInt();
        sms_marketing_obj = in.readByte() != 0;
        sms_marketing_respond = in.readByte() != 0;
        sms_marketing_respond_datetime = in.readString();
        status = in.readInt();
        type = in.readInt();
        updated_at = in.readInt();
        war_zone_id = in.readInt();
        wx_openid = in.readString();
    }

    public String getLevelstr(){
        String levelstr = null;
        switch (level){
            case 0:
                levelstr = "铁牌";
                break;
            case 10:
                levelstr = "铁牌";
                break;
            case  20:
                levelstr = "铜牌";
                break;
            case 30:
                levelstr = "银牌";
                break;
            case 40:
                levelstr = "金牌";
                break;
        }

        return levelstr;
    }

    public static final Creator<AddrbookBean> CREATOR = new Creator<AddrbookBean>() {
        @Override
        public AddrbookBean createFromParcel(Parcel in) {
            return new AddrbookBean(in);
        }

        @Override
        public AddrbookBean[] newArray(int size) {
            return new AddrbookBean[size];
        }
    };

    public int getActive() {
        return active;
    }

    public void setActive(int active) {
        this.active = active;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public int getArea_id() {
        return area_id;
    }

    public void setArea_id(int area_id) {
        this.area_id = area_id;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public double getBal() {
        return bal;
    }

    public void setBal(double bal) {
        this.bal = bal;
    }

    public String getBank_acct_name() {
        return bank_acct_name;
    }

    public void setBank_acct_name(String bank_acct_name) {
        this.bank_acct_name = bank_acct_name;
    }

    public String getBank_acct_num() {
        return bank_acct_num;
    }

    public void setBank_acct_num(String bank_acct_num) {
        this.bank_acct_num = bank_acct_num;
    }

    public String getBank_name() {
        return bank_name;
    }

    public void setBank_name(String bank_name) {
        this.bank_name = bank_name;
    }

    public String getBind_date() {
        return bind_date;
    }

    public void setBind_date(String bind_date) {
        this.bind_date = bind_date;
    }

    public int getBind_user_id() {
        return bind_user_id;
    }

    public void setBind_user_id(int bind_user_id) {
        this.bind_user_id = bind_user_id;
    }

    public String getBind_user_name() {
        return bind_user_name;
    }

    public void setBind_user_name(String bind_user_name) {
        this.bind_user_name = bind_user_name;
    }

    public int getBind_wx_openid() {
        return bind_wx_openid;
    }

    public void setBind_wx_openid(int bind_wx_openid) {
        this.bind_wx_openid = bind_wx_openid;
    }

    public boolean isBlack() {
        return black;
    }

    public void setBlack(boolean black) {
        this.black = black;
    }

    public int getBreach_count() {
        return breach_count;
    }

    public void setBreach_count(int breach_count) {
        this.breach_count = breach_count;
    }

    public int getCallback_at() {
        return callback_at;
    }

    public void setCallback_at(int callback_at) {
        this.callback_at = callback_at;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCom() {
        return com;
    }

    public void setCom(String com) {
        this.com = com;
    }

    public long getCreated_at() {
        return created_at;
    }

    public void setCreated_at(long created_at) {
        this.created_at = created_at;
    }

    public int getCredit() {
        return credit;
    }

    public void setCredit(int credit) {
        this.credit = credit;
    }

    public int getDeleted_at() {
        return deleted_at;
    }

    public void setDeleted_at(int deleted_at) {
        this.deleted_at = deleted_at;
    }

    public String getEncrypted_() {
        return encrypted_;
    }

    public void setEncrypted_(String encrypted_) {
        this.encrypted_ = encrypted_;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public boolean isHas_paid() {
        return has_paid;
    }

    public void setHas_paid(boolean has_paid) {
        this.has_paid = has_paid;
    }

    public boolean isHas_set_business() {
        return has_set_business;
    }

    public void setHas_set_business(boolean has_set_business) {
        this.has_set_business = has_set_business;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getIm_token() {
        return im_token;
    }

    public void setIm_token(String im_token) {
        this.im_token = im_token;
    }

    public int getIndustry() {
        return industry;
    }

    public void setIndustry(int industry) {
        this.industry = industry;
    }

    public boolean isIs_internal() {
        return is_internal;
    }

    public void setIs_internal(boolean is_internal) {
        this.is_internal = is_internal;
    }

    public int getIs_virt() {
        return is_virt;
    }

    public void setIs_virt(int is_virt) {
        this.is_virt = is_virt;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public int getNo_sms() {
        return no_sms;
    }

    public void setNo_sms(int no_sms) {
        this.no_sms = no_sms;
    }

    public int getPhone_area_id() {
        return phone_area_id;
    }

    public void setPhone_area_id(int phone_area_id) {
        this.phone_area_id = phone_area_id;
    }

    public String getPos() {
        return pos;
    }

    public void setPos(String pos) {
        this.pos = pos;
    }

    public String getProv() {
        return prov;
    }

    public void setProv(String prov) {
        this.prov = prov;
    }

    public String getPush_reg_id() {
        return push_reg_id;
    }

    public void setPush_reg_id(String push_reg_id) {
        this.push_reg_id = push_reg_id;
    }

    public int getRecent_login_at() {
        return recent_login_at;
    }

    public void setRecent_login_at(int recent_login_at) {
        this.recent_login_at = recent_login_at;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getSms_current_send_date() {
        return sms_current_send_date;
    }

    public void setSms_current_send_date(String sms_current_send_date) {
        this.sms_current_send_date = sms_current_send_date;
    }

    public String getSms_marketing_first_date() {
        return sms_marketing_first_date;
    }

    public void setSms_marketing_first_date(String sms_marketing_first_date) {
        this.sms_marketing_first_date = sms_marketing_first_date;
    }

    public int getSms_marketing_level() {
        return sms_marketing_level;
    }

    public void setSms_marketing_level(int sms_marketing_level) {
        this.sms_marketing_level = sms_marketing_level;
    }

    public boolean isSms_marketing_obj() {
        return sms_marketing_obj;
    }

    public void setSms_marketing_obj(boolean sms_marketing_obj) {
        this.sms_marketing_obj = sms_marketing_obj;
    }

    public boolean isSms_marketing_respond() {
        return sms_marketing_respond;
    }

    public void setSms_marketing_respond(boolean sms_marketing_respond) {
        this.sms_marketing_respond = sms_marketing_respond;
    }

    public String getSms_marketing_respond_datetime() {
        return sms_marketing_respond_datetime;
    }

    public void setSms_marketing_respond_datetime(String sms_marketing_respond_datetime) {
        this.sms_marketing_respond_datetime = sms_marketing_respond_datetime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getUpdated_at() {
        return updated_at;
    }

    public void setUpdated_at(int updated_at) {
        this.updated_at = updated_at;
    }

    public int getWar_zone_id() {
        return war_zone_id;
    }

    public void setWar_zone_id(int war_zone_id) {
        this.war_zone_id = war_zone_id;
    }

    public String getWx_openid() {
        return wx_openid;
    }

    public void setWx_openid(String wx_openid) {
        this.wx_openid = wx_openid;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(active);
        dest.writeString(addr);
        dest.writeInt(area_id);
        dest.writeString(avatar);
        dest.writeDouble(bal);
        dest.writeString(bank_acct_name);
        dest.writeString(bank_acct_num);
        dest.writeString(bank_name);
        dest.writeString(bind_date);
        dest.writeInt(bind_user_id);
        dest.writeString(bind_user_name);
        dest.writeInt(bind_wx_openid);
        dest.writeByte((byte) (black ? 1 : 0));
        dest.writeInt(breach_count);
        dest.writeInt(callback_at);
        dest.writeString(city);
        dest.writeString(com);
        dest.writeLong(created_at);
        dest.writeInt(credit);
        dest.writeInt(deleted_at);
        dest.writeString(encrypted_);
        dest.writeInt(gender);
        dest.writeByte((byte) (has_paid ? 1 : 0));
        dest.writeByte((byte) (has_set_business ? 1 : 0));
        dest.writeLong(id);
        dest.writeString(im_token);
        dest.writeInt(industry);
        dest.writeByte((byte) (is_internal ? 1 : 0));
        dest.writeInt(is_virt);
        dest.writeInt(level);
        dest.writeString(mobile);
        dest.writeString(nickname);
        dest.writeInt(no_sms);
        dest.writeInt(phone_area_id);
        dest.writeString(pos);
        dest.writeString(prov);
        dest.writeString(push_reg_id);
        dest.writeInt(recent_login_at);
        dest.writeString(remark);
        dest.writeString(sms_current_send_date);
        dest.writeString(sms_marketing_first_date);
        dest.writeInt(sms_marketing_level);
        dest.writeByte((byte) (sms_marketing_obj ? 1 : 0));
        dest.writeByte((byte) (sms_marketing_respond ? 1 : 0));
        dest.writeString(sms_marketing_respond_datetime);
        dest.writeInt(status);
        dest.writeInt(type);
        dest.writeInt(updated_at);
        dest.writeInt(war_zone_id);
        dest.writeString(wx_openid);
    }
}
